import request from '@/utils/request'

// 查询账套列表
export function listAccounts(query) {
  return request({
    url: '/caiwu/accounts/list',
    method: 'get',
    params: query
  })
}

// 查询账套详细
export function getAccounts(accountId) {
  return request({
    url: '/caiwu/accounts/' + accountId,
    method: 'get'
  })
}

// 新增账套
export function addAccounts(data) {
  return request({
    url: '/caiwu/accounts',
    method: 'post',
    data: data
  })
}

// 修改账套
export function updateAccounts(data) {
  return request({
    url: '/caiwu/accounts',
    method: 'put',
    data: data
  })
}

// 删除账套
export function delAccounts(accountId) {
  return request({
    url: '/caiwu/accounts/' + accountId,
    method: 'delete'
  })
}
